<%@ page language="java" pageEncoding="utf-8"%>
<%@page import="com.farm.web.constant.FarmConstant"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/view/conf/farmtag.tld" prefix="PF"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<base href="<PF:basePath/>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${project.name }-<PF:ParameterValue
		key="config.sys.title" /></title>
<meta name="description"
	content='<PF:ParameterValue key="config.sys.mate.description"/>'>
<meta name="keywords"
	content='<PF:ParameterValue key="config.sys.mate.keywords"/>'>
<meta name="author"
	content='<PF:ParameterValue key="config.sys.mate.author"/>'>
<meta name="robots" content="index,follow">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<jsp:include page="../atext/include-web.jsp"></jsp:include>
<script src="text/lib/echarts/echarts.min.4.4.0.js"></script>
<style>
.table-striped button {
	margin-left: 1em;
}
</style>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<!-- 导航 -->
			<jsp:include page="../commons/head.jsp"></jsp:include>
		</div>
	</div>
	<div class="container-fluid "
		style="background-color: #eceef1; padding-top: 80px; padding-bottom: 50px;">
		<div class="container" style="margin-bottom: 50px;">
			<div class="row">
				<div class="col-md-12" style="padding-bottom: 20px;">
					<h3>${project.name }</h3>
				</div>
			</div>
			<div class="row">
				<div class="col-md-12" style="padding-bottom: 20px;">
					<div class="bs-example" data-example-id="striped-table">
						<table class="table table-striped">
							<thead>
								<tr>
									<th>#</th>
									<th>创建时间</th>
									<th>实例备注</th>
									<th>功能</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${actives }" var="node" varStatus="statu">
									<tr>
										<th scope="row">${statu.index +1}</th>
										<td><PF:FormatTime date="${node.ctime }"
												yyyyMMddHHmmss="yyyy年MM月dd日HH时mm分" /></td>
										<td>${node.pcontent }</td>
										<td><button type="button"
												onclick="window.open('prorun/index.do?activeid=${node.id }&pagemodel=${pagemodel}')"
												class="btn btn-primary">打开</button>
											<button type="button"
												onclick="window.open('prorun/delActive.do?activeid=${node.id }')"
												class="btn btn-warning">刪除</button></td>
									</tr>
								</c:forEach>
								<tr>
									<th scope="row"></th>
									<td></td>
									<td></td>
									<td><button type="button" data-toggle="modal"
											data-target="#myModal" class="btn btn-success">创建</button></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>

		</div>
	</div>
	<div class="container-fluid" style="padding: 0px;">
		<!-- 页脚 -->
		<jsp:include page="../commons/foot.jsp"></jsp:include>
	</div>





	<!-- Modal -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">启动一个生成实例</h4>
				</div>
				<div class="modal-body">
					<div class="bs-example" data-example-id="textarea-form-control">
						<form id="activeForm" method="post" action="prorun/creatRun.do">
							<textarea name="note" class="form-control" rows="3"
								placeholder="实例备注"></textarea>
							<input type="hidden" name="projectid" value="${project.id}">
							<input type="hidden" name="pagemodel" value="${pagemodel}">
						</form>
						<div></div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
					<button type="button" onclick="$('#activeForm').submit();"
						class="btn btn-primary">立即创建</button>
				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	
</script>
</html>